//

//

uiRoot = {}

let UIBase = function () {

}
UIBase.prototype = {
    m_parentDiv: null,
    m_rootDiv: null,
    m_clearBtn: null,
    o_isOpen: false,
    Init: function (m_parentDiv) {
        this.m_parentDiv = m_parentDiv;
        this.m_rootDiv = CreateCard.CreateView(m_parentDiv, "ArtTreeView");
        this.m_rootDiv.style.backgroundColor = "#005588";
        this.m_rootDiv.o_thisObj = this;
        CardDrag_SetDrag(this.m_rootDiv)
        let thisObj = this;
        this.m_clearBtn = CreateCard.CreateBtn(this.m_rootDiv, "关闭", function () {
            thisObj.o_isOpen = !thisObj.o_isOpen;
            thisObj._SetIsShow(thisObj.o_isOpen);
        });
    },
    _SetIsShow: function (isShow) {
        this.o_isOpen = isShow;
        this.m_rootDiv.style.display = isShow ? "none" : "block";
    },
    Open: function () {
        this._SetIsShow(true);
    },
    Close: function () {
        this._SetIsShow(false);
    },
    Update: function () {
    },
    Destroy: function () {

    },
}

